package com.frame.work.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.frame.work.entity.DeviceAssociatedInformation;
import com.frame.work.entity.DeviceZy;
import com.frame.work.entity.FingerprintLockMessageDO;
import com.frame.work.entity.TblDeviceActions;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;


/**
 * @author hewenze
 */
@Component
public interface SelectDeviceMapper extends BaseMapper<DeviceZy> {
    /**
     * @Description:获取设备关联信息：device_id, device_name, pushType, gateway_name, defend_status, home_name, user_id, account, nick_name, source_type, source_id, organization_code
     * @param: deviceMac
     * @return: List<Map>
     * @author:wjming
     * @Date:2021/1/26 19:12
     */
    List<DeviceAssociatedInformation> getDevice1(@Param("deviceMac") String deviceMac);

    List<TblDeviceActions> getDevice2(@Param("deviceMac") String deviceMac,
                                      @Param("od") String od,
                                      @Param("deviceType") String deviceType,
                                      @Param("productType") String productType
    );

    List<Map> getDevice3(@Param("deviceMac") String deviceMac);

    List<Map> getDevice4(@Param("userId") String userId, @Param("deviceMac") String deviceMac
    );

    /**
     * 获取指纹锁相关信息
     *
     * @param fingerprintId
     * @param deviceMac
     * @return
     */
    FingerprintLockMessageDO getFingerprintLockMessage(@Param("userId") String fingerprintId, @Param("deviceMac") String deviceMac);

    String getDevice5(@Param("homeId") String homeId);


}
